import axios from "./axios";

export default {
	//获取所有商品
	query: (data) => axios({
		method: "get",
		url: "/api/goods/getAll",
		data
	}),
	//新增商品
	add: (data) => axios({
		method: "post",
		url: "/api/goods/add",
		data
	}),
	//顾客下单
	add2: (data) => axios({
		method: "post",
		url: "/api/order/add",
		data
	}),
	//删除商品
	shanchu: (id) => axios({
		method: "delete",
		url: "/api/goods/delete/" + id
	}),
	shanchu2: (id) => axios({
		method: "delete",
		url: "/api/order/delete/" + id
	}),
	//查询所有订单
	get: (data) => axios({
		method: "get",
		url: "/api/order/getall",
		data
	}),
	//顾客获取单个商品详情
	query2: (goodsname) => axios({
		method: "get",
		url: "/api/goods/get/" + goodsname
	})
<<<<<<< HEAD
};
=======
};
>>>>>>> 4ec8550f4d58e2b9ecb92f69c9f83472b396d829
